package com.hello.sky.controller.user;

import com.hello.sky.model.dto.UserLoginDTO;
import com.hello.sky.model.vo.UserLoginVO;
import com.hello.sky.result.Result;
import com.hello.sky.service.UserService;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 用户信息 前端控制器
 * </p>
 *
 * @author D
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService  userService;

    @PostMapping("/user/login")
    public Result userLogin(@RequestBody UserLoginDTO dto){
        UserLoginVO vo = userService.wxLogin(dto);

        return Result.success(vo);
    }
}
